import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    redirect:'/dispose'
  },
  {
    path: '/order',
    name: 'order',
    component: () => import('../views/order.vue')
  },
  {
    path: '/information',
    name: 'information',
    component: () => import('../views/information.vue')
  },
  {
    path: '/workbench',
    name: 'workbench',
    component: () => import('../views/workbench.vue')
  },
  {
    path: '/dispose',
    name: 'dispose',
    component: () => import('../views/dispose.vue'),
    redirect:'/dispose1',
    children:[
      {
        path: '/dispose1',
        name: 'dispose1',
        component: () => import('../views/dispose/dispose1')
      },{
        path: '/dispose2',
        name: 'dispose2',
        component: () => import('../views/dispose/dispose2')
      },{
        path: '/dispose3',
        name: 'dispose3',
        component: () => import('../views/dispose/dispose3')
      },{
        path: '/dispose4',
        name: 'dispose4',
        component: () => import('../views/dispose/dispose4')
      },
    ],
  }
  
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
